﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Simple.Repository.Migrations
{
    public partial class _7 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "AreaValue",
                table: "GardenHouseInfo");

            migrationBuilder.AlterColumn<string>(
                name: "FileSize",
                table: "SysFileInfo",
                type: "varchar(50)",
                maxLength: 50,
                nullable: false,
                comment: "文件大小",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldComment: "文件大小")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "AreaName",
                table: "GardenHouseInfo",
                type: "longtext",
                nullable: false,
                comment: "区县名称")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.InsertData(
                table: "SysPosition",
                columns: new[] { "Id", "Code", "CreatedTime", "CreatedUserId", "IsEnabled", "Name", "Remark", "Sort", "UpdatedTime", "UpdatedUserId" },
                values: new object[] { new Guid("d45fb54e-2b58-43d1-9844-a4becd699926"), "nurse", null, null, true, "保育员", "保育员", 100, null, null });

            migrationBuilder.InsertData(
                table: "SysPosition",
                columns: new[] { "Id", "Code", "CreatedTime", "CreatedUserId", "IsEnabled", "Name", "Remark", "Sort", "UpdatedTime", "UpdatedUserId" },
                values: new object[] { new Guid("f6df2b59-47fd-4020-9469-056ac2cd3357"), "teacher", null, null, true, "教师", "教师岗位", 100, null, null });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "SysPosition",
                keyColumn: "Id",
                keyValue: new Guid("d45fb54e-2b58-43d1-9844-a4becd699926"));

            migrationBuilder.DeleteData(
                table: "SysPosition",
                keyColumn: "Id",
                keyValue: new Guid("f6df2b59-47fd-4020-9469-056ac2cd3357"));

            migrationBuilder.DropColumn(
                name: "AreaName",
                table: "GardenHouseInfo");

            migrationBuilder.AlterColumn<string>(
                name: "FileSize",
                table: "SysFileInfo",
                type: "longtext",
                nullable: false,
                comment: "文件大小",
                oldClrType: typeof(string),
                oldType: "varchar(50)",
                oldMaxLength: 50,
                oldComment: "文件大小")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "AreaValue",
                table: "GardenHouseInfo",
                type: "longtext",
                nullable: false,
                comment: "区县值")
                .Annotation("MySql:CharSet", "utf8mb4");
        }
    }
}
